home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 945 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.3 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: Rob Stewart <stew@datalytics.com>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Suggestion to the C++ standard
  5. Date: 02 Apr 1996 16:52:06 PST
  6. Organization: Datalytics, Inc
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <31616170.7BD7@datalytics.com>
  9. References: <4jatnm$s9b@post.tau.ac.il> <31599c95.4890732@nntp.ix.netcom.com> <315c0f6e.956220382@news.datalytics.com> <315cafc1.4316827@nntp.ix.netcom.com>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: Tue, 02 Apr 1996 12:18:40 -0500
  12. X-Mailer: Mozilla 2.0 (WinNT; I)
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMWHLuEy4NqrwXLNJAQEKggH+Jh4U3aJM/2Kvjh32fnOx5H8w0AmGpCGC
  15.     y9bkB8r6eSh8Ju2jkmxcl3mvGMOJylsRD8TIyvXNMp6Mc87nYYu0eg==
  16.     =b2b6
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. Jason D. Morris wrote:
  20. > On 29 Mar 1996 09:07:43 PST, davidb@datalytics.com (David Bradley)
  21. > wrote:
  22. > >Lastly the naming of the data member/accessors breaks most common
  23. > >styles.  Usually the member functions are distingiushed in some manner
  24. > >from the data members.
  25. > If you mean not explicitly naming the get/set functions with get/set
  26. > tacked on the beginning of the name then yes, I agree that the
  27. > property template breaks with common style.  Personally, I never use
  28. > get/set prefixes in any of the code that I write.  When I do have
  29. > members that perform get/set operations I overload member function
  30. > acessors with names like those used by the property class.  Client
  31. > code should never rely on any internal class implementation details;
  32. > only interfaces to the services provided by the class.
  33.  
  34. Consider a naming convention in which dms are prefixed with 
  35. "m_."  In that case, public dms would have names like "m_Data," 
  36. while the corresponding accessor/modifier mfs would be named 
  37. "Data."  Only when dms are named the same way as mfs would there 
  38. be no problem recognizing that you just add parentheses to the 
  39. dm name.
  40.  
  41. -- 
  42. Robert Stewart        | My opinions are usually my own.
  43. Datalytics, Inc.    | stew@datalytics.com
  44. ---
  45. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  46.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  47.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  48.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  49.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  50. ]
  51.